import Vue from 'vue'
import Router from 'vue-router'
import layout from '@/view/layout'
import index from '@/view/index'
import mysend from '@/view/mysend'
import person from '@/view/person'
import order from '@/view/order'
import submitOrder from '@/view/submitOrder'
import setAddress from '@/view/setAddress'
import selectUser from '@/view/selectUser'
import mySendDetail from '@/view/mySendDetail'
import mySendOrderDetail from '@/view/mySendOrderDetail'
import setHeader from '@/view/setHeader'
import setName from '@/view/setName'
import attention from '@/view/attention'
import setPhone from '@/view/setPhone'
import myCode from '@/view/myCode'
import s_address from '@/view/s_address'
import login from '@/view/login'
import register from '@/view/register'
import editAddress from '@/view/editAddress'
import decvtio from '@/view/decvtio'
import wpass from '@/view/wpass'
import follow from '@/view/follow'
import auth from '@/view/auth'
import login2 from '@/view/login2'
import xiyi from '@/view/xiyi'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'layout',
      component: layout,
      redirect:'/index',
      children:[
        {
          path: '/index',
          name: 'index',
          component: index,
        },
        {
          path: '/mysend',
          name: 'mysend',
          component: mysend,
        },
        {
          path: '/person',
          name: 'person',
          component: person,
        },
      ]
    },
    {
      path:'/order',
      name:'order',
      component:order
    },
    {
      path:'/login2',
      name:'login2',
      component:login2
    },
    {
      path:'/xiyi',
      name:'xiyi',
      component:xiyi
    },
    {
      path:'/auth',
      name:'auth',
      component:auth
    },
    {
      path:'/follow',
      name:'follow',
      component:follow
    },
    {
      path:'/wpass',
      name:'wpass',
      component:wpass
    },
    {
      path:'/decvtio',
      name:'decvtio',
      component:decvtio
    },
    {
      path:'/s_address',
      name:'s_address',
      component:s_address   
    },
    {
      path:'/editAddress',
      name:'editAddress',
      component:editAddress
    },
    {
      path:'/login',
      name:'login',
      component:login
    },
    {
      path:'/register',
      name:'register',
      component:register
    },
    {
      path:'/submitOrder',
      name:'submitOrder',
      component:submitOrder
    },
    {
      path:'/setAddress',
      name:'setAddress',
      component:setAddress
    },
    {
      path:"/selectUser",
      name:"selectUser",
      component:selectUser
    },
    {
      path:"/mySendDetail",
      name:"mySendDetail",
      component:mySendDetail
    },
    {
      path:'/mySendOrderDetail',
      name:'mySendOrderDetail',
      component:mySendOrderDetail
    },
    {
      path:'/setHeader',
      name:'setHeader',
      component:setHeader
    },
    {
      path:'/setName',
      name:'setName',
      component:setName
    },
    {
      path:'/attention',
      name:'attention',
      component:attention
    },
    {
      path:'/setPhone',
      name:'setPhone',
      component:setPhone
    },
    {
      path:'/myCode',
      name:'myCode',
      component:myCode
    },
  ]
})
